//
//  DYSetCollectionFooterView.m
//  kafuMerchant
//
//  Created by 帝云科技 on 2018/9/21.
//  Copyright © 2018年 帝云科技. All rights reserved.
//

#import "DYSetCollectionFooterView.h"

@interface DYSetCollectionFooterView ()

@property (nonatomic,strong)UILabel *tipLabel;
@property (nonatomic,strong)UIButton *submitButton;

@end

@implementation DYSetCollectionFooterView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self=[super initWithFrame:frame]) {
        [self initView];
    }
    return self;
}
-(void)initView
{
    self.backgroundColor=WhiteColor;
    
    self.tipLabel =({
        UILabel *label=[Utils labelWithTitle:@"提示：收款信息一旦提交，则自动确认，如因信息错误导致收款失败，由信息提交人自行承担责任。如收款信息发生变化，请尽快变更。" titleFontSize:12 textColor:[UIColor xhq_content] backgroundColor:WhiteColor alignment:0];
        label.numberOfLines=0;
        label.attributedText=[DYAppCommon getRange:NSMakeRange(0, @"提示：".length) labelStr:label.text Font:label.font Color:[UIColor xhq_aTitle]];
        [label xhq_lineSpace:BILIHEIGHT(3)];
        label;
    });
    
    self.submitButton =({
      UIButton * button=[Utils createBtnWithType:UIButtonTypeCustom backgroundColor:[UIColor xhq_base] action:@selector(submitButtonClick) target:self title:@"确认提交" image:@"icon_login" font:17 textColor:WhiteColor];
        [button xhq_cornerRadius:BILIHEIGHT(19)];
        button;
    });
    
    
    [self addSubview:self.tipLabel];
    [self addSubview:self.submitButton];
    
    [self.tipLabel makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(BILIHEIGHT(10));
        make.left.equalTo(BILIWIDTH(10));
        make.right.equalTo(BILIWIDTH(-10));
    }];
    
    [self.submitButton makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tipLabel.bottom).offset(BILIHEIGHT(30));
        make.right.equalTo(BILIWIDTH(-10));
        make.size.equalTo(CGSizeMake(BILIWIDTH(132), BILIHEIGHT(38)));
    }];
    
    [self.submitButton placeImageTitlePosition: ZYButtonImagePositionRight space:BILIWIDTH(10)];
}
-(void)submitButtonClick
{
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
